diff --git a/system/database/drivers/mssql/mssql.php b/system/database/drivers/mssql/mssql.php
deleted file mode 100644
index 5f30bf9..0000000
--- a/system/database/drivers/mssql/mssql.php
+++ /dev/null
@@ -1,457 +0,0 @@
-<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
-/**
- * Code Igniter
- *
- * An open source application development framework for PHP 4.3.2 or newer
- *
- * @package		CodeIgniter
- * @author		Rick Ellis
- * @copyright	Copyright (c) 2006, pMachine, Inc.
- * @license		http://www.codeignitor.com/user_guide/license.html 
- * @link		http://www.codeigniter.com
- * @since		Version 1.0
- * @filesource
- */
- 
-// ------------------------------------------------------------------------
-
-/**
- * MS SQL Database Adapter Class
- *
- * Note: _DB is an extender class that the app controller
- * creates dynamically based on whether the active record
- * class is being used or not.
- *
- * @package		CodeIgniter
- * @subpackage	Drivers
- * @category	Database
- * @author		Rick Ellis
- * @link		http://www.codeigniter.com/user_guide/database/
- */
-class CI_DB_mssql extends CI_DB {
-
-	/**
-	 * Non-persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_connect()
-	{
-		return mssql_connect($this->hostname, $this->username, $this->password);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_pconnect()
-	{
-		return mssql_pconnect($this->hostname, $this->username, $this->password);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Select the database
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_select()
-	{
-		return @mssql_select_db($this->database, $this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Execute the query
-	 *
-	 * @access	private called by the base class
-	 * @param	string	an SQL query
-	 * @return	resource
-	 */	
-	function _execute($sql)
-	{
-		$sql = $this->_prep_query($sql);
-		return @mssql_query($sql, $this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Prep the query
-	 *
-	 * If needed, each database adapter can prep the query string
-	 *
-	 * @access	private called by execute()
-	 * @param	string	an SQL query
-	 * @return	string
-	 */	
-    function _prep_query($sql)
-    {
-		return $sql;
-    }
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Begin Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_begin($test_mode = FALSE)
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-		
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		// Reset the transaction failure flag.
-		// If the $test_mode flag is set to TRUE transactions will be rolled back 
-		// even if the queries produce a successful result. 
-		$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
-
-		$this->simple_query('BEGIN TRAN');
-		return TRUE;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Commit Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_commit()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$this->simple_query('COMMIT TRAN');
-		return TRUE;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Rollback Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_rollback()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$this->simple_query('ROLLBACK TRAN');
-		return TRUE;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape String
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function escape_str($str)	
-	{	
-		// Escape single quotes
-		return str_replace("'", "''", $str);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Affected Rows
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function affected_rows()
-	{
-		return @mssql_rows_affected($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert ID
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function insert_id()
-	{
-		// Not supported in MS SQL?
-		return 0;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * "Count All" query
-	 *
-	 * Generates a platform-specific query string that counts all records in
-	 * the specified database
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function count_all($table = '')
-	{
-		if ($table == '')
-			return '0';
-	
-		$query = $this->query("SELECT COUNT(*) AS numrows FROM `".$this->dbprefix.$table."`");
-		
-		if ($query->num_rows() == 0)
-			return '0';
-
-		$row = $query->row();
-		return $row->numrows;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function error_message()
-	{
-		// Are errros even supported in MS SQL?
-		return '';
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message number
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function error_number()
-	{
-		// Are error numbers supported?
-		return '';
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape Table Name
-	 *
-	 * This function adds backticks if the table name has a period
-	 * in it. Some DBs will get cranky unless periods are escaped
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function escape_table($table)
-	{
-		if (stristr($table, '.'))
-		{
-			$table = preg_replace("/\./", "`.`", $table);
-		}
-		
-		return $table;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Field data query
-	 *
-	 * Generates a platform-specific query so that the column data can be retrieved
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	object
-	 */
-	function _field_data($table)
-	{
-		$sql = "SELECT TOP 1 FROM ".$this->escape_table($table);
-		$query = $this->query($sql);
-		return $query->field_data();
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert statement
-	 *
-	 * Generates a platform-specific insert string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the insert keys
-	 * @param	array	the insert values
-	 * @return	string
-	 */
-	function _insert($table, $keys, $values)
-	{	
-		return "INSERT INTO ".$this->escape_table($table)." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Update statement
-	 *
-	 * Generates a platform-specific update string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the update data
-	 * @param	array	the where clause
-	 * @return	string
-	 */
-	function _update($table, $values, $where)
-	{
-		foreach($values as $key => $val)
-		{
-			$valstr[] = $key." = ".$val;
-		}
-	
-		return "UPDATE ".$this->escape_table($table)." SET ".implode(', ', $valstr)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Delete statement
-	 *
-	 * Generates a platform-specific delete string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the where clause
-	 * @return	string
-	 */	
-	function _delete($table, $where)
-	{
-		return "DELETE FROM ".$this->escape_table($table)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Version number query string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _version()
-	{
-		return "SELECT version() AS ver";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show table query
-	 *
-	 * Generates a platform-specific query string so that the table names can be fetched
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _show_tables()
-	{
-		return "SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name";		
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show columnn query
-	 *
-	 * Generates a platform-specific query string so that the column names can be fetched
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function _show_columns($table = '')
-	{
-		return "SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = '".$this->escape_table($table)."'";	
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Limit string
-	 *
-	 * Generates a platform-specific LIMIT clause
-	 *
-	 * @access	public
-	 * @param	string	the sql query string
-	 * @param	integer	the number of rows to limit the query to
-	 * @param	integer	the offset value
-	 * @return	string
-	 */
-	function _limit($sql, $limit, $offset)
-	{
-		$i = $limit + $offset;
-	
-		return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$i.' ', $sql);		
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Close DB Connection
-	 *
-	 * @access	public
-	 * @param	resource
-	 * @return	void
-	 */
-	function _close($conn_id)
-	{
-		mssql_close($conn_id);
-	}
-	
-
-}
-
-
-?>
\ No newline at end of file
diff --git a/system/database/drivers/mysql/mysql.php b/system/database/drivers/mysql/mysql.php
deleted file mode 100644
index 4d59f78..0000000
--- a/system/database/drivers/mysql/mysql.php
+++ /dev/null
@@ -1,478 +0,0 @@
-<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
-/**
- * Code Igniter
- *
- * An open source application development framework for PHP 4.3.2 or newer
- *
- * @package		CodeIgniter
- * @author		Rick Ellis
- * @copyright	Copyright (c) 2006, pMachine, Inc.
- * @license		http://www.codeignitor.com/user_guide/license.html 
- * @link		http://www.codeigniter.com
- * @since		Version 1.0
- * @filesource
- */
- 
-// ------------------------------------------------------------------------
-
-/**
- * MySQL Database Adapter Class
- *
- * Note: _DB is an extender class that the app controller
- * creates dynamically based on whether the active record
- * class is being used or not.
- *
- * @package		CodeIgniter
- * @subpackage	Drivers
- * @category	Database
- * @author		Rick Ellis
- * @link		http://www.codeigniter.com/user_guide/database/
- */
-class CI_DB_mysql extends CI_DB {
-
-	/**
-	 * Whether to use the MySQL "delete hack" which allows the number
-	 * of affected rows to be shown. Uses a preg_replace when enabled, 
-	 * adding a bit more processing to all queries.
-	 */	
-	var $delete_hack = TRUE; 
-
-	/**
-	 * Non-persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_connect()
-	{
-		return mysql_connect($this->hostname, $this->username, $this->password, TRUE);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_pconnect()
-	{
-		return mysql_pconnect($this->hostname, $this->username, $this->password);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Select the database
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_select()
-	{
-		return @mysql_select_db($this->database, $this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Execute the query
-	 *
-	 * @access	private called by the base class
-	 * @param	string	an SQL query
-	 * @return	resource
-	 */	
-	function _execute($sql)
-	{
-		$sql = $this->_prep_query($sql);
-		return @mysql_query($sql, $this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Prep the query
-	 *
-	 * If needed, each database adapter can prep the query string
-	 *
-	 * @access	private called by execute()
-	 * @param	string	an SQL query
-	 * @return	string
-	 */	
-    function _prep_query($sql)
-    {
-		// "DELETE FROM TABLE" returns 0 affected rows This hack modifies 
-		// the query so that it returns the number of affected rows
-		if ($this->delete_hack === TRUE)
-		{
-			if (preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $sql)) 
-			{
-				$sql = preg_replace("/^\s*DELETE\s+FROM\s+(\S+)\s*$/", "DELETE FROM \\1 WHERE 1=1", $sql);
-			}
-		}
-		
-		return $sql;
-    }
-    
-	// --------------------------------------------------------------------
-
-	/**
-	 * Begin Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_begin($test_mode = FALSE)
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-		
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		// Reset the transaction failure flag.
-		// If the $test_mode flag is set to TRUE transactions will be rolled back 
-		// even if the queries produce a successful result. 
-		$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
-		
-		$this->simple_query('SET AUTOCOMMIT=0');
-		$this->simple_query('START TRANSACTION'); // can also be BEGIN or BEGIN WORK
-		return TRUE;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Commit Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_commit()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$this->simple_query('COMMIT');
-		$this->simple_query('SET AUTOCOMMIT=1');
-		return TRUE;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Rollback Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_rollback()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$this->simple_query('ROLLBACK');
-		$this->simple_query('SET AUTOCOMMIT=1');
-		return TRUE;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape String
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function escape_str($str)	
-	{	
-		return mysql_real_escape_string($str);
-	}
-		
-	// --------------------------------------------------------------------
-
-	/**
-	 * Affected Rows
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function affected_rows()
-	{
-		return @mysql_affected_rows($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert ID
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function insert_id()
-	{
-		return @mysql_insert_id($this->conn_id);
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * "Count All" query
-	 *
-	 * Generates a platform-specific query string that counts all records in
-	 * the specified database
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function count_all($table = '')
-	{
-		if ($table == '')
-			return '0';
-	
-		$query = $this->query("SELECT COUNT(*) AS numrows FROM `".$this->dbprefix.$table."`");
-		
-		if ($query->num_rows() == 0)
-			return '0';
-
-		$row = $query->row();
-		return $row->numrows;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function error_message()
-	{
-		return mysql_error($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message number
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function error_number()
-	{
-		return mysql_errno($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape Table Name
-	 *
-	 * This function adds backticks if the table name has a period
-	 * in it. Some DBs will get cranky unless periods are escaped
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function escape_table($table)
-	{
-		if (stristr($table, '.'))
-		{
-			$table = preg_replace("/\./", "`.`", $table);
-		}
-		
-		return $table;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Field data query
-	 *
-	 * Generates a platform-specific query so that the column data can be retrieved
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	object
-	 */
-	function _field_data($table)
-	{
-		$sql = "SELECT * FROM ".$this->escape_table($table)." LIMIT 1";
-		$query = $this->query($sql);
-		return $query->field_data();
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert statement
-	 *
-	 * Generates a platform-specific insert string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the insert keys
-	 * @param	array	the insert values
-	 * @return	string
-	 */
-	function _insert($table, $keys, $values)
-	{	
-		return "INSERT INTO ".$this->escape_table($table)." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Update statement
-	 *
-	 * Generates a platform-specific update string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the update data
-	 * @param	array	the where clause
-	 * @return	string
-	 */
-	function _update($table, $values, $where)
-	{
-		foreach($values as $key => $val)
-		{
-			$valstr[] = $key." = ".$val;
-		}
-	
-		return "UPDATE ".$this->escape_table($table)." SET ".implode(', ', $valstr)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Delete statement
-	 *
-	 * Generates a platform-specific delete string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the where clause
-	 * @return	string
-	 */	
-	function _delete($table, $where)
-	{
-		return "DELETE FROM ".$this->escape_table($table)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Version number query string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _version()
-	{
-		return "SELECT version() AS ver";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show table query
-	 *
-	 * Generates a platform-specific query string so that the table names can be fetched
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _show_tables()
-	{	  
-		return "SHOW TABLES FROM `".$this->database."`";		
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show columnn query
-	 *
-	 * Generates a platform-specific query string so that the column names can be fetched
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function _show_columns($table = '')
-	{
-		return "SHOW COLUMNS FROM ".$this->escape_table($table);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Limit string
-	 *
-	 * Generates a platform-specific LIMIT clause
-	 *
-	 * @access	public
-	 * @param	string	the sql query string
-	 * @param	integer	the number of rows to limit the query to
-	 * @param	integer	the offset value
-	 * @return	string
-	 */
-	function _limit($sql, $limit, $offset)
-	{	
-		if ($offset == 0)
-		{
-			$offset = '';
-		}
-		else
-		{
-			$offset .= ", ";
-		}
-		
-		return $sql."LIMIT ".$offset.$limit;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Close DB Connection
-	 *
-	 * @access	public
-	 * @param	resource
-	 * @return	void
-	 */
-	function _close($conn_id)
-	{
-		mysql_close($conn_id);
-	}
-
-}
-
-?>
\ No newline at end of file
diff --git a/system/database/drivers/mysqli/mysqli.php b/system/database/drivers/mysqli/mysqli.php
deleted file mode 100644
index 6ca21c9..0000000
--- a/system/database/drivers/mysqli/mysqli.php
+++ /dev/null
@@ -1,479 +0,0 @@
-<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
-/**
- * Code Igniter
- *
- * An open source application development framework for PHP 4.3.2 or newer
- *
- * @package		CodeIgniter
- * @author		Rick Ellis
- * @copyright	Copyright (c) 2006, pMachine, Inc.
- * @license		http://www.codeignitor.com/user_guide/license.html 
- * @link		http://www.codeigniter.com
- * @since		Version 1.0
- * @filesource
- */
- 
-// ------------------------------------------------------------------------
-
-/**
- * MySQLi Database Adapter Class - MySQLi only works with PHP 5
- *
- * Note: _DB is an extender class that the app controller
- * creates dynamically based on whether the active record
- * class is being used or not.
- *
- * @package		CodeIgniter
- * @subpackage	Drivers
- * @category	Database
- * @author		Rick Ellis
- * @link		http://www.codeigniter.com/user_guide/database/
- */
-class CI_DB_mysqli extends CI_DB {
-
-	/**
-	 * Whether to use the MySQL "delete hack" which allows the number
-	 * of affected rows to be shown. Uses a preg_replace when enabled, 
-	 * adding a bit more processing to all queries.
-	 */	
-	var $delete_hack = TRUE; 
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Non-persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_connect()
-	{
-		return mysqli_connect($this->hostname, $this->username, $this->password);
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_pconnect()
-	{
-		return $this->db_connect();
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Select the database
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_select()
-	{
-		return @mysqli_select_db($this->conn_id, $this->database);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Execute the query
-	 *
-	 * @access	private called by the base class
-	 * @param	string	an SQL query
-	 * @return	resource
-	 */	
-	function _execute($sql)
-	{
-		$sql = $this->_prep_query($sql);	
-		$result = @mysqli_query($this->conn_id, $sql);
-		return $result;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Prep the query
-	 *
-	 * If needed, each database adapter can prep the query string
-	 *
-	 * @access	private called by execute()
-	 * @param	string	an SQL query
-	 * @return	string
-	 */	
-    function _prep_query($sql)
-    {
-		// "DELETE FROM TABLE" returns 0 affected rows This hack modifies 
-		// the query so that it returns the number of affected rows
-		if ($this->delete_hack === TRUE)
-		{
-			if (preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $sql)) 
-			{
-				$sql = preg_replace("/^\s*DELETE\s+FROM\s+(\S+)\s*$/", "DELETE FROM \\1 WHERE 1=1", $sql);
-			}
-		}
-		
-		return $sql;
-    }
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Begin Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_begin($test_mode = FALSE)
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-		
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		// Reset the transaction failure flag.
-		// If the $test_mode flag is set to TRUE transactions will be rolled back 
-		// even if the queries produce a successful result. 
-		$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
-
-		$this->simple_query('SET AUTOCOMMIT=0');
-		$this->simple_query('START TRANSACTION'); // can also be BEGIN or BEGIN WORK
-		return TRUE;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Commit Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_commit()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$this->simple_query('COMMIT');
-		$this->simple_query('SET AUTOCOMMIT=1');
-		return TRUE;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Rollback Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_rollback()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$this->simple_query('ROLLBACK');
-		$this->simple_query('SET AUTOCOMMIT=1');
-		return TRUE;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape String
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function escape_str($str)	
-	{	
-		return mysqli_real_escape_string($this->conn_id, $str);
-	}
-		
-	// --------------------------------------------------------------------
-
-	/**
-	 * Affected Rows
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function affected_rows()
-	{
-		return @mysqli_affected_rows($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert ID
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function insert_id()
-	{
-		return @mysqli_insert_id($this->conn_id);
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * "Count All" query
-	 *
-	 * Generates a platform-specific query string that counts all records in
-	 * the specified database
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function count_all($table = '')
-	{
-		if ($table == '')
-			return '0';
-	
-		$query = $this->query("SELECT COUNT(*) AS numrows FROM `".$this->dbprefix.$table."`");
-		
-		if ($query->num_rows() == 0)
-			return '0';
-
-		$row = $query->row();
-		return $row->numrows;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function error_message()
-	{
-		return mysqli_error($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message number
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function error_number()
-	{
-		return mysqli_errno($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape Table Name
-	 *
-	 * This function adds backticks if the table name has a period
-	 * in it. Some DBs will get cranky unless periods are escaped
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function escape_table($table)
-	{
-		if (stristr($table, '.'))
-		{
-			$table = preg_replace("/\./", "`.`", $table);
-		}
-		
-		return $table;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Field data query
-	 *
-	 * Generates a platform-specific query so that the column data can be retrieved
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	object
-	 */
-	function _field_data($table)
-	{
-		$sql = "SELECT * FROM ".$this->escape_table($table)." LIMIT 1";
-		$query = $this->query($sql);
-		return $query->field_data();
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert statement
-	 *
-	 * Generates a platform-specific insert string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the insert keys
-	 * @param	array	the insert values
-	 * @return	string
-	 */
-	function _insert($table, $keys, $values)
-	{	
-		return "INSERT INTO ".$this->escape_table($table)." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Update statement
-	 *
-	 * Generates a platform-specific update string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the update data
-	 * @param	array	the where clause
-	 * @return	string
-	 */
-	function _update($table, $values, $where)
-	{
-		foreach($values as $key => $val)
-		{
-			$valstr[] = $key." = ".$val;
-		}
-	
-		return "UPDATE ".$this->escape_table($table)." SET ".implode(', ', $valstr)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Delete statement
-	 *
-	 * Generates a platform-specific delete string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the where clause
-	 * @return	string
-	 */	
-	function _delete($table, $where)
-	{
-		return "DELETE FROM ".$this->escape_table($table)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Version number query string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _version()
-	{
-		return "SELECT version() AS ver";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show table query
-	 *
-	 * Generates a platform-specific query string so that the table names can be fetched
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _show_tables()
-	{	  
-		return "SHOW TABLES FROM `".$this->database."`";		
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show columnn query
-	 *
-	 * Generates a platform-specific query string so that the column names can be fetched
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function _show_columns($table = '')
-	{
-		return "SHOW COLUMNS FROM ".$this->escape_table($table);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Limit string
-	 *
-	 * Generates a platform-specific LIMIT clause
-	 *
-	 * @access	public
-	 * @param	string	the sql query string
-	 * @param	integer	the number of rows to limit the query to
-	 * @param	integer	the offset value
-	 * @return	string
-	 */
-	function _limit($sql, $limit, $offset)
-	{	
-		$sql .= "LIMIT ".$limit;
-	
-		if ($offset > 0)
-		{
-			$sql .= " OFFSET ".$offset;
-		}
-		
-		return $sql;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Close DB Connection
-	 *
-	 * @access	public
-	 * @param	resource
-	 * @return	void
-	 */
-	function _close($conn_id)
-	{
-		mysqli_close($conn_id);
-	}
-
-}
-
-?>
\ No newline at end of file
diff --git a/system/database/drivers/oci8/oci8.php b/system/database/drivers/oci8/oci8.php
deleted file mode 100644
index 40aabce..0000000
--- a/system/database/drivers/oci8/oci8.php
+++ /dev/null
@@ -1,608 +0,0 @@
-<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
-/**
- * Code Igniter
- *
- * An open source application development framework for PHP 4.3.2 or newer
- *
- * @package     CodeIgniter
- * @author      Rick Ellis
- * @copyright   Copyright (c) 2006, pMachine, Inc.
- * @license     http://www.codeignitor.com/user_guide/license.html 
- * @link        http://www.codeigniter.com
- * @since       Version 1.0
- * @filesource
- */
-
-// ------------------------------------------------------------------------
-
-/**
- * oci8 Database Adapter Class
- *
- * Note: _DB is an extender class that the app controller
- * creates dynamically based on whether the active record
- * class is being used or not.
- *
- * @package     CodeIgniter
- * @subpackage  Drivers
- * @category    Database
- * @author      Rick Ellis
- * @link        http://www.codeigniter.com/user_guide/database/
- */
-
-/**
- * oci8 Database Adapter Class
- *
- * This is a modification of the DB_driver class to 
- * permit access to oracle databases
- *
- * NOTE: this uses the PHP 4 oci methods
- *
- * @author      Kelly McArdle
- *
- */
-
-class CI_DB_oci8 extends CI_DB {
-
-	// Set "auto commit" by default
-    var $_commit = OCI_COMMIT_ON_SUCCESS;
-
-    // need to track statement id and cursor id
-    var $stmt_id;
-    var $curs_id;
-
-    // if we use a limit, we will add a field that will
-    // throw off num_fields later
-    var $limit_used;
-    
-    /**
-     * Non-persistent database connection
-     *
-     * @access  private called by the base class
-     * @return  resource
-     */
-    function db_connect()
-    {
-        return ocilogon($this->username, $this->password, $this->hostname);
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Persistent database connection
-     *
-     * @access  private called by the base class
-     * @return  resource
-     */
-    function db_pconnect()
-    {
-        return ociplogon($this->username, $this->password, $this->hostname);
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Select the database
-     *
-     * @access  private called by the base class
-     * @return  resource
-     */
-    function db_select()
-    {
-        return TRUE;
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Execute the query
-     *
-     * @access  private called by the base class
-     * @param   string  an SQL query
-     * @return  resource
-     */
-    function _execute($sql)
-    {
-        // oracle must parse the query before it
-        // is run, all of the actions with
-        // the query are based off the statement id
-        // returned by ociparse        
-        $this->_set_stmt_id($sql);
-        ocisetprefetch($this->stmt_id, 1000);
-        return @ociexecute($this->stmt_id, $this->_commit);
-    }
-    
-    /**
-     * Generate a statement ID
-     *
-     * @access  private
-     * @param   string  an SQL query
-     * @return  none
-     */
-    function _set_stmt_id($sql)
-    {
-        if ( ! is_resource($this->stmt_id))
-        {
-			$this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql));
-        }
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Prep the query
-     *
-     * If needed, each database adapter can prep the query string
-     *
-     * @access  private called by execute()
-     * @param   string  an SQL query
-     * @return  string
-     */
-    function _prep_query($sql)
-    {
-        return $sql;
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * getCursor.  Returns a cursor from the datbase
-     *
-     * @access  public
-     * @return  cursor id
-     */
-    function get_cursor()
-    {
-		return $this->curs_id = ocinewcursor($this->conn_id);
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Stored Procedure.  Executes a stored procedure
-     *
-     * @access  public
-     * @param   package     package stored procedure is in
-     * @param   procedure   stored procedure to execute
-     * @param   params      array of parameters
-     * @return  array
-     *
-     * params array keys
-     *
-     * KEY      OPTIONAL    NOTES
-     * name     no          the name of the parameter should be in :<param_name> format
-     * value    no          the value of the parameter.  If this is an OUT or IN OUT parameter,
-     *                      this should be a reference to a variable
-     * type     yes         the type of the parameter
-     * length   yes         the max size of the parameter
-     */
-    function stored_procedure($package, $procedure, $params)
-    {
-        if ($package == '' OR $procedure == '' OR ! is_array($params))
-        {
-            if ($this->db_debug)
-            {
-                log_message('error', 'Invalid query: '.$package.'.'.$procedure);
-                return $this->display_error('db_invalid_query');
-            }
-            return FALSE;
-        }
-		
-		// build the query string
-		$sql = "begin $package.$procedure(";
-
-		$have_cursor = FALSE;
-		foreach($params as $param)
-		{
-			$sql .= $param['name'] . ",";
-			
-			if (array_key_exists('type', $param) && ($param['type'] == OCI_B_CURSOR))
-			{
-				$have_cursor = TRUE;
-			}
-		}
-		$sql = trim($sql, ",") . "); end;";
-				
-		$this->stmt_id = FALSE;
-		$this->_set_stmt_id($sql);
-		$this->_bind_params($params); 
-		$this->query($sql, FALSE, $have_cursor);
-	}
-	
-    // --------------------------------------------------------------------
-
-    /**
-     * Bind parameters
-     *
-     * @access  private
-     * @return  none
-     */
-	function _bind_params($params)
-	{
-		if ( ! is_array($params) OR ! is_resource($this->stmt_id))
-		{
-			return;
-		}
-		
-        foreach ($params as $param)
-        {
- 			foreach (array('name', 'value', 'type', 'length') as $val)
-        	{
-        		if ( ! isset($param[$val]))
-        		{
-        			$param[$val] = '';
-        		}
-        	}
- 
-			ocibindbyname($this->stmt_id, $param['name'], $param['value'], $param['length'], $param['type']);
-        }
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Begin Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_begin($test_mode = FALSE)
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-		
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-		
-		// Reset the transaction failure flag.
-		// If the $test_mode flag is set to TRUE transactions will be rolled back 
-		// even if the queries produce a successful result. 
-		$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
-		
-		$this->_commit = OCI_DEFAULT;
-		return TRUE;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Commit Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_commit()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$ret = OCIcommit($this->conn_id);
-		$this->_commit = OCI_COMMIT_ON_SUCCESS;
-		return $ret;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Rollback Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_rollback()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$ret = OCIrollback($this->conn_id);
-		$this->_commit = OCI_COMMIT_ON_SUCCESS;
-		return $ret;
-	}
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Escape String
-     *
-     * @access  public
-     * @param   string
-     * @return  string
-     */
-    function escape_str($str)
-    {
-        return $str;
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Affected Rows
-     *
-     * @access  public
-     * @return  integer
-     */
-    function affected_rows()
-    {
-        return @ocirowcount($this->stmt_id);
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Insert ID
-     *
-     * @access  public
-     * @return  integer
-     */
-    function insert_id()
-    {
-        // not supported in oracle
-        return 0;
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * "Count All" query
-     *
-     * Generates a platform-specific query string that counts all records in
-     * the specified database
-     *
-     * @access  public
-     * @param   string
-     * @return  string
-     */
-    function count_all($table = '')
-    {
-        if ($table == '')
-            return '0';
-
-        $query = $this->query("SELECT COUNT(1) AS numrows FROM ".$table);
-
-        if ($query == FALSE)
-            {
-            return 0;
-            }
-
-        $row = $query->row();
-        return $row->NUMROWS;
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * The error message string
-     *
-     * @access  public
-     * @return  string
-     */
-    function error_message()
-    {
-        $error = ocierror($this->conn_id);
-        return $error['message'];
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * The error message number
-     *
-     * @access  public
-     * @return  integer
-     */
-    function error_number()
-    {
-        $error = ocierror($this->conn_id);
-        return $error['code'];
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Escape Table Name
-     *
-     * This function adds backticks if the table name has a period
-     * in it. Some DBs will get cranky unless periods are escaped
-     *
-     * @access  public
-     * @param   string  the table name
-     * @return  string
-     */
-    function escape_table($table)
-    {
-        if (stristr($table, '.'))
-        {
-            $table = preg_replace("/\./", "`.`", $table);
-        }
-
-        return $table;
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Field data query
-     *
-     * Generates a platform-specific query so that the column data can be retrieved
-     *
-     * @access  public
-     * @param   string  the table name
-     * @return  object
-     */
-    function _field_data($table)
-    {
-        $sql = "SELECT * FROM ".$this->escape_table($table)." where rownum = 1";
-        $query = $this->query($sql);
-        return $query->field_data();
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Insert statement
-     *
-     * Generates a platform-specific insert string from the supplied data
-     *
-     * @access  public
-     * @param   string  the table name
-     * @param   array   the insert keys
-     * @param   array   the insert values
-     * @return  string
-     */
-    function _insert($table, $keys, $values)
-    {
-    return "INSERT INTO ".$this->escape_table($table)." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Update statement
-     *
-     * Generates a platform-specific update string from the supplied data
-     *
-     * @access  public
-     * @param   string  the table name
-     * @param   array   the update data
-     * @param   array   the where clause
-     * @return  string
-     */
-    function _update($table, $values, $where)
-    {
-        foreach($values as $key => $val)
-        {
-            $valstr[] = $key." = ".$val;
-        }
-
-        return "UPDATE ".$this->escape_table($table)." SET ".implode(', ', $valstr)." WHERE ".implode(" ", $where);
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Delete statement
-     *
-     * Generates a platform-specific delete string from the supplied data
-     *
-     * @access  public
-     * @param   string  the table name
-     * @param   array   the where clause
-     * @return  string
-     */
-    function _delete($table, $where)
-    {
-        return "DELETE FROM ".$this->escape_table($table)." WHERE ".implode(" ", $where);
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Version number query string
-     *
-     * @access  public
-     * @return  string
-     */
-    function _version()
-    {
-        $ver = ociserverversion($this->conn_id);
-        return $ver;
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Show table query
-     *
-     * Generates a platform-specific query string so that the table names can be fetched
-     *
-     * @access  public
-     * @return  string
-     */
-    function _show_tables()
-    {
-        return "select TABLE_NAME FROM ALL_TABLES";
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Show columnn query
-     *
-     * Generates a platform-specific query string so that the column names can be fetched
-     *
-     * @access  public
-     * @param   string  the table name
-     * @return  string
-     */
-    function _show_columns($table = '')
-    {
-        return "SELECT COLUMN_NAME FROM all_tab_columns WHERE table_name = '$table'";
-    }
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Limit string
-     *
-     * Generates a platform-specific LIMIT clause
-     *
-     * @access  public
-     * @param   string  the sql query string
-     * @param   integer the number of rows to limit the query to
-     * @param   integer the offset value
-     * @return  string
-     */
-    function _limit($sql, $limit, $offset)
-    {
-        $limit = $offset + $limit;
-        $newsql = "SELECT * FROM (select inner_query.*, rownum rnum FROM ($sql) inner_query WHERE rownum < $limit)";
-
-        if ($offset != 0)
-        {
-            $newsql .= " WHERE rnum >= $offset";
-        }
-
-        // remember that we used limits
-        $this->limit_used = TRUE;
-
-        return $newsql;
-    }	
-
-    // --------------------------------------------------------------------
-
-    /**
-     * Close DB Connection
-     *
-     * @access  public
-     * @param   resource
-     * @return  void
-     */
-    function _close($conn_id)
-    {
-        ocilogoff($conn_id);
-    }
-
-}
-
-
-?>
\ No newline at end of file
diff --git a/system/database/drivers/odbc/odbc.php b/system/database/drivers/odbc/odbc.php
deleted file mode 100644
index ea311e5..0000000
--- a/system/database/drivers/odbc/odbc.php
+++ /dev/null
@@ -1,454 +0,0 @@
-<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
-/**
- * Code Igniter
- *
- * An open source application development framework for PHP 4.3.2 or newer
- *
- * @package		CodeIgniter
- * @author		Rick Ellis
- * @copyright	Copyright (c) 2006, pMachine, Inc.
- * @license		http://www.codeignitor.com/user_guide/license.html 
- * @link		http://www.codeigniter.com
- * @since		Version 1.0
- * @filesource
- */
- 
-// ------------------------------------------------------------------------
-
-/**
- * ODBC Database Adapter Class
- *
- * Note: _DB is an extender class that the app controller
- * creates dynamically based on whether the active record
- * class is being used or not.
- * 
- * @package		CodeIgniter
- * @subpackage	Drivers
- * @category	Database
- * @author		Rick Ellis
- * @link		http://www.codeigniter.com/user_guide/database/
- */
-class CI_DB_odbc extends CI_DB {
-
-	/**
-	 * Non-persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_connect()
-	{
-		return odbc_connect($this->database, $this->username, $this->password);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_pconnect()
-	{
-		return odbc_pconnect($this->database, $this->username, $this->password);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Select the database
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_select()
-	{
-		// Not needed for ODBC
-		return TRUE;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Execute the query
-	 *
-	 * @access	private called by the base class
-	 * @param	string	an SQL query
-	 * @return	resource
-	 */	
-	function _execute($sql)
-	{
-		$sql = $this->_prep_query($sql);
-		return @odbc_exec($this->conn_id, $sql);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Prep the query
-	 *
-	 * If needed, each database adapter can prep the query string
-	 *
-	 * @access	private called by execute()
-	 * @param	string	an SQL query
-	 * @return	string
-	 */	
-    function _prep_query($sql)
-    {
-		return $sql;
-    }
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Begin Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_begin($test_mode = FALSE)
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-		
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		// Reset the transaction failure flag.
-		// If the $test_mode flag is set to TRUE transactions will be rolled back 
-		// even if the queries produce a successful result. 
-		$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
-
-		return odbc_autocommit($this->conn_id, FALSE);
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Commit Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_commit()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$ret = odbc_commit($this->conn_id);
-		odbc_autocommit($this->conn_id, TRUE);
-		return $ret;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Rollback Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_rollback()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$ret = odbc_rollback($this->conn_id);
-		odbc_autocommit($this->conn_id, TRUE);
-		return $ret;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape String
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function escape_str($str)	
-	{
-		// ODBC doesn't require escaping
-		return $str;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Affected Rows
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function affected_rows()
-	{
-		return @odbc_num_rows($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert ID
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function insert_id()
-	{
-		return @odbc_insert_id($this->conn_id);
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * "Count All" query
-	 *
-	 * Generates a platform-specific query string that counts all records in
-	 * the specified database
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function count_all($table = '')
-	{
-		if ($table == '')
-			return '0';
-	
-		$query = $this->query("SELECT COUNT(*) AS numrows FROM `".$this->dbprefix.$table."`");
-		
-		if ($query->num_rows() == 0)
-			return '0';
-
-		$row = $query->row();
-		return $row->numrows;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function error_message()
-	{
-		return odbc_errormsg($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message number
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function error_number()
-	{
-		return odbc_error($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape Table Name
-	 *
-	 * This function adds backticks if the table name has a period
-	 * in it. Some DBs will get cranky unless periods are escaped
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function escape_table($table)
-	{
-		if (stristr($table, '.'))
-		{
-			$table = preg_replace("/\./", "`.`", $table);
-		}
-		
-		return $table;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Field data query
-	 *
-	 * Generates a platform-specific query so that the column data can be retrieved
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	object
-	 */
-	function _field_data($table)
-	{
-		$sql = "SELECT TOP 1 FROM ".$this->escape_table($table);
-		$query = $this->query($sql);
-		return $query->field_data();
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert statement
-	 *
-	 * Generates a platform-specific insert string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the insert keys
-	 * @param	array	the insert values
-	 * @return	string
-	 */
-	function _insert($table, $keys, $values)
-	{	
-		return "INSERT INTO ".$this->escape_table($table)." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Update statement
-	 *
-	 * Generates a platform-specific update string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the update data
-	 * @param	array	the where clause
-	 * @return	string
-	 */
-	function _update($table, $values, $where)
-	{
-		foreach($values as $key => $val)
-		{
-			$valstr[] = $key." = ".$val;
-		}
-	
-		return "UPDATE ".$this->escape_table($table)." SET ".implode(', ', $valstr)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Delete statement
-	 *
-	 * Generates a platform-specific delete string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the where clause
-	 * @return	string
-	 */	
-	function _delete($table, $where)
-	{
-		return "DELETE FROM ".$this->escape_table($table)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Version number query string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _version()
-	{
-		return "SELECT version() AS ver";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show table query
-	 *
-	 * Generates a platform-specific query string so that the table names can be fetched
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _show_tables()
-	{	  
-		return "SHOW TABLES FROM `".$this->database."`";		
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show columnn query
-	 *
-	 * Generates a platform-specific query string so that the column names can be fetched
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function _show_columns($table = '')
-	{
-		return "SHOW COLUMNS FROM ".$this->escape_table($table);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Limit string
-	 *
-	 * Generates a platform-specific LIMIT clause
-	 *
-	 * @access	public
-	 * @param	string	the sql query string
-	 * @param	integer	the number of rows to limit the query to
-	 * @param	integer	the offset value
-	 * @return	string
-	 */
-	function _limit($sql, $limit, $offset)
-	{
-		// Does ODBC doesn't use the LIMIT clause?
-		return $sql;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Close DB Connection
-	 *
-	 * @access	public
-	 * @param	resource
-	 * @return	void
-	 */
-	function _close($conn_id)
-	{
-		odbc_close($conn_id);
-	}
-	
-}
-
-
-?>
\ No newline at end of file
diff --git a/system/database/drivers/postgre/postgre.php b/system/database/drivers/postgre/postgre.php
deleted file mode 100644
index 317df37..0000000
--- a/system/database/drivers/postgre/postgre.php
+++ /dev/null
@@ -1,484 +0,0 @@
-<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
-/**
- * Code Igniter
- *
- * An open source application development framework for PHP 4.3.2 or newer
- *
- * @package		CodeIgniter
- * @author		Rick Ellis
- * @copyright	Copyright (c) 2006, pMachine, Inc.
- * @license		http://www.codeignitor.com/user_guide/license.html 
- * @link		http://www.codeigniter.com
- * @since		Version 1.0
- * @filesource
- */
- 
-// ------------------------------------------------------------------------
-
-/**
- * Postgre Database Adapter Class
- *
- * Note: _DB is an extender class that the app controller
- * creates dynamically based on whether the active record
- * class is being used or not.
- *
- * @package		CodeIgniter
- * @subpackage	Drivers
- * @category	Database
- * @author		Rick Ellis
- * @link		http://www.codeigniter.com/user_guide/database/
- */
-class CI_DB_postgre extends CI_DB {
-
-	/**
-	 * Non-persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_connect()
-	{
-		$port = ($this->port == '') ? '' : " port=".$this->port;
-		
-		return pg_connect("host=".$this->hostname.$port." dbname=".$this->database." user=".$this->username." password=".$this->password);
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_pconnect()
-	{
-		$port = ($this->port == '') ? '' : " port=".$this->port;
-
-		return pg_pconnect("host=".$this->hostname.$port." dbname=".$this->database." user=".$this->username." password=".$this->password);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Select the database
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_select()
-	{
-		// Not needed for Postgre so we'll return TRUE
-		return TRUE;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Execute the query
-	 *
-	 * @access	private called by the base class
-	 * @param	string	an SQL query
-	 * @return	resource
-	 */	
-	function _execute($sql)
-	{
-		$sql = $this->_prep_query($sql);
-		return @pg_query($this->conn_id, $sql);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Prep the query
-	 *
-	 * If needed, each database adapter can prep the query string
-	 *
-	 * @access	private called by execute()
-	 * @param	string	an SQL query
-	 * @return	string
-	 */	
-    function _prep_query($sql)
-    {
-		return $sql;
-    }
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Begin Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_begin($test_mode = FALSE)
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-		
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		// Reset the transaction failure flag.
-		// If the $test_mode flag is set to TRUE transactions will be rolled back 
-		// even if the queries produce a successful result. 
-		$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
-
-		return @pg_exec($this->conn_id, "begin");
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Commit Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_commit()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		return @pg_exec($this->conn_id, "commit");
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Rollback Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_rollback()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		return @pg_exec($this->conn_id, "rollback");
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape String
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function escape_str($str)	
-	{	
-		return pg_escape_string($str);
-	}
-		
-	// --------------------------------------------------------------------
-
-	/**
-	 * Affected Rows
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function affected_rows()
-	{
-		return @pg_affected_rows($this->result_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert ID
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function insert_id()
-	{
-		$v = pg_version($this->conn_id);
-		$v = $v['server'];
-		
-		$table	= func_num_args() > 0 ? func_get_arg(0) : null;
-		$column	= func_num_args() > 1 ? func_get_arg(1) : null;
-		
-		if ($table == null && $v >= '8.1')
-		{
-			$sql='SELECT LASTVAL() as ins_id';
-		}
-		elseif ($table != null && $column != null && $v >= '8.0')
-		{
-			$sql = sprintf("SELECT pg_get_serial_sequence('%s','%s') as seq", $table, $column);
-			$query = $this->query($sql);
-			$row = $query->row();
-			$sql = sprintf("SELECT CURRVAL('%s') as ins_id", $row->seq);
-		}
-		elseif ($table != null)
-		{
-			// seq_name passed in table parameter
-			$sql = sprintf("SELECT CURRVAL('%s') as ins_id", $table);
-		}
-		else
-		{
-			return pg_last_oid($this->result_id);
-		}
-		$query = $this->query($sql);
-		$row = $query->row();
-		return $row->ins_id;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * "Count All" query
-	 *
-	 * Generates a platform-specific query string that counts all records in
-	 * the specified database
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function count_all($table = '')
-	{
-		if ($table == '')
-			return '0';
-	
-		$query = $this->query('SELECT COUNT(*) AS numrows FROM "'.$this->dbprefix.$table.'"');
-		
-		if ($query->num_rows() == 0)
-			return '0';
-
-		$row = $query->row();
-		return $row->numrows;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function error_message()
-	{
-		return pg_last_error($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message number
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function error_number()
-	{
-		return '';
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape Table Name
-	 *
-	 * This function adds backticks if the table name has a period
-	 * in it. Some DBs will get cranky unless periods are escaped.
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function escape_table($table)
-	{
-		if (stristr($table, '.'))
-		{
-			$table = '"'.preg_replace("/\./", '"."', $table).'"';
-		}
-		
-		return $table;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Field data query
-	 *
-	 * Generates a platform-specific query so that the column data can be retrieved
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	object
-	 */
-	function _field_data($table)
-	{
-		$sql = "SELECT * FROM ".$this->escape_table($table)." LIMIT 1";
-		$query = $this->query($sql);
-		return $query->field_data();
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert statement
-	 *
-	 * Generates a platform-specific insert string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the insert keys
-	 * @param	array	the insert values
-	 * @return	string
-	 */
-	function _insert($table, $keys, $values)
-	{	
-		return "INSERT INTO ".$this->escape_table($table)." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Update statement
-	 *
-	 * Generates a platform-specific update string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the update data
-	 * @param	array	the where clause
-	 * @return	string
-	 */
-	function _update($table, $values, $where)
-	{
-		foreach($values as $key => $val)
-		{
-			$valstr[] = $key." = ".$val;
-		}
-	
-		return "UPDATE ".$this->escape_table($table)." SET ".implode(', ', $valstr)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Delete statement
-	 *
-	 * Generates a platform-specific delete string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the where clause
-	 * @return	string
-	 */	
-	function _delete($table, $where)
-	{
-		return "DELETE FROM ".$this->escape_table($table)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Version number query string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _version()
-	{
-		return "SELECT version() AS ver";
-	}
-
-	/**
-	 * Show table query
-	 *
-	 * Generates a platform-specific query string so that the table names can be fetched
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _show_tables()
-	{	  
-		return "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'";	
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show columnn query
-	 *
-	 * Generates a platform-specific query string so that the column names can be fetched
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function _show_columns($table = '')
-	{
-		return "SELECT column_name FROM information_schema.columns WHERE table_name ='".$this->escape_table($table)."'"; 	
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Limit string
-	 *
-	 * Generates a platform-specific LIMIT clause
-	 *
-	 * @access	public
-	 * @param	string	the sql query string
-	 * @param	integer	the number of rows to limit the query to
-	 * @param	integer	the offset value
-	 * @return	string
-	 */
-	function _limit($sql, $limit, $offset)
-	{	
-		$sql .= "LIMIT ".$limit;
-	
-		if ($offset > 0)
-		{
-			$sql .= " OFFSET ".$offset;
-		}
-		
-		return $sql;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Close DB Connection
-	 *
-	 * @access	public
-	 * @param	resource
-	 * @return	void
-	 */
-	function _close($conn_id)
-	{
-		pg_close($conn_id);
-	}
-
-}
-
-?>
\ No newline at end of file
diff --git a/system/database/drivers/sqlite/sqlite.php b/system/database/drivers/sqlite/sqlite.php
deleted file mode 100644
index 6116a84..0000000
--- a/system/database/drivers/sqlite/sqlite.php
+++ /dev/null
@@ -1,481 +0,0 @@
-<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
-/**
- * Code Igniter
- *
- * An open source application development framework for PHP 4.3.2 or newer
- *
- * @package		CodeIgniter
- * @author		Rick Ellis
- * @copyright	Copyright (c) 2006, pMachine, Inc.
- * @license		http://www.codeignitor.com/user_guide/license.html 
- * @link		http://www.codeigniter.com
- * @since		Version 1.0
- * @filesource
- */
- 
-// ------------------------------------------------------------------------
-
-
-
-/**
- * SQLite Database Adapter Class
- *
- * Note: _DB is an extender class that the app controller
- * creates dynamically based on whether the active record
- * class is being used or not.
- *
- * @package		CodeIgniter
- * @subpackage	Drivers
- * @category	Database
- * @author		Rick Ellis
- * @link		http://www.codeigniter.com/user_guide/database/
- */
-class CI_DB_sqlite extends CI_DB {
-
-	/**
-	 * Non-persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_connect()
-	{
-		if ( ! $conn_id = sqlite_open($this->database, 0666, $error))
-		{
-			log_message('error', $error);
-			
-            if ($this->db_debug)
-            {
-				$this->display_error($error, '', TRUE);
-            }		
-		}
-		
-		return $conn_id;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Persistent database connection
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_pconnect()
-	{
-		if ( ! $conn_id = sqlite_popen($this->database, 0666, $error))
-		{
-			log_message('error', $error);
-			
-            if ($this->db_debug)
-            {
-				$this->display_error($error, '', TRUE);
-            }		
-		}
-		
-		return $conn_id;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Select the database
-	 *
-	 * @access	private called by the base class
-	 * @return	resource
-	 */	
-	function db_select()
-	{
-		return TRUE;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Execute the query
-	 *
-	 * @access	private called by the base class
-	 * @param	string	an SQL query
-	 * @return	resource
-	 */	
-	function _execute($sql)
-	{
-		$sql = $this->_prep_query($sql);
-		return @sqlite_query($this->conn_id, $sql);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Prep the query
-	 *
-	 * If needed, each database adapter can prep the query string
-	 *
-	 * @access	private called by execute()
-	 * @param	string	an SQL query
-	 * @return	string
-	 */	
-    function _prep_query($sql)
-    {
-		return $sql;
-    }
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Begin Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_begin($test_mode = FALSE)
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-		
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		// Reset the transaction failure flag.
-		// If the $test_mode flag is set to TRUE transactions will be rolled back 
-		// even if the queries produce a successful result. 
-		$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
-
-		$this->simple_query('BEGIN TRANSACTION');
-		return TRUE;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Commit Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_commit()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$this->simple_query('COMMIT');
-		return TRUE;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Rollback Transaction
-	 * 
-	 * @access	public
-	 * @return	bool		 
-	 */	
-	function trans_rollback()
-	{
-		if ( ! $this->trans_enabled)
-		{
-			return TRUE;
-		}
-
-		// When transactions are nested we only begin/commit/rollback the outermost ones
-		if ($this->_trans_depth > 0)
-		{
-			return TRUE;
-		}
-
-		$this->simple_query('ROLLBACK');
-		return TRUE;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape String
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function escape_str($str)	
-	{
-		return sqlite_escape_string($str);
-	}
-		
-	// --------------------------------------------------------------------
-
-	/**
-	 * Affected Rows
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function affected_rows()
-	{
-		return sqlite_changes($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert ID
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function insert_id()
-	{
-		return @sqlite_last_insert_rowid($this->conn_id);
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * "Count All" query
-	 *
-	 * Generates a platform-specific query string that counts all records in
-	 * the specified database
-	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
-	 */
-	function count_all($table = '')
-	{
-		if ($table == '')
-			return '0';
-	
-		$query = $this->query("SELECT COUNT(*) AS numrows FROM `".$this->dbprefix.$table."`");
-		
-		if ($query->num_rows() == 0)
-			return '0';
-
-		$row = $query->row();
-		return $row->numrows;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function error_message()
-	{
-		return sqlite_error_string(sqlite_last_error($this->conn_id));
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * The error message number
-	 *
-	 * @access	public
-	 * @return	integer
-	 */
-	function error_number()
-	{
-		return sqlite_last_error($this->conn_id);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Version number query string
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function version()
-	{
-		return sqlite_libversion();
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Escape Table Name
-	 *
-	 * This function adds backticks if the table name has a period
-	 * in it. Some DBs will get cranky unless periods are escaped
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function escape_table($table)
-	{
-		if (stristr($table, '.'))
-		{
-			$table = preg_replace("/\./", "`.`", $table);
-		}
-		
-		return $table;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Field data query
-	 *
-	 * Generates a platform-specific query so that the column data can be retrieved
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	object
-	 */
-	function _field_data($table)
-	{
-		$sql = "SELECT * FROM ".$this->escape_table($table)." LIMIT 1";
-		$query = $this->query($sql);
-		return $query->field_data();
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Insert statement
-	 *
-	 * Generates a platform-specific insert string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the insert keys
-	 * @param	array	the insert values
-	 * @return	string
-	 */
-	function _insert($table, $keys, $values)
-	{	
-		return "INSERT INTO ".$this->escape_table($table)." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Update statement
-	 *
-	 * Generates a platform-specific update string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the update data
-	 * @param	array	the where clause
-	 * @return	string
-	 */
-	function _update($table, $values, $where)
-	{
-		foreach($values as $key => $val)
-		{
-			$valstr[] = $key." = ".$val;
-		}
-	
-		return "UPDATE ".$this->escape_table($table)." SET ".implode(', ', $valstr)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Delete statement
-	 *
-	 * Generates a platform-specific delete string from the supplied data
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @param	array	the where clause
-	 * @return	string
-	 */	
-	function _delete($table, $where)
-	{
-		return "DELETE FROM ".$this->escape_table($table)." WHERE ".implode(" ", $where);
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show table query
-	 *
-	 * Generates a platform-specific query string so that the table names can be fetched
-	 *
-	 * @access	public
-	 * @return	string
-	 */
-	function _show_tables()
-	{
-		return "SELECT name from sqlite_master WHERE type='table'";
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Show columnn query
-	 *
-	 * Generates a platform-specific query string so that the column names can be fetched
-	 *
-	 * @access	public
-	 * @param	string	the table name
-	 * @return	string
-	 */
-	function _show_columns($table = '')
-	{
-		// Not supported
-		return FALSE;
-	}
-	
-	// --------------------------------------------------------------------
-
-	/**
-	 * Limit string
-	 *
-	 * Generates a platform-specific LIMIT clause
-	 *
-	 * @access	public
-	 * @param	string	the sql query string
-	 * @param	integer	the number of rows to limit the query to
-	 * @param	integer	the offset value
-	 * @return	string
-	 */
-	function _limit($sql, $limit, $offset)
-	{	
-		if ($offset == 0)
-		{
-			$offset = '';
-		}
-		else
-		{
-			$offset .= ", ";
-		}
-		
-		return $sql."LIMIT ".$offset.$limit;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Close DB Connection
-	 *
-	 * @access	public
-	 * @param	resource
-	 * @return	void
-	 */
-	function _close($conn_id)
-	{
-		sqlite_close($conn_id);
-	}
-
-}
-
-?>
\ No newline at end of file
diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php
index 5be1050..61c8363 100644
--- a/system/libraries/Controller.php
+++ b/system/libraries/Controller.php
@@ -381,10 +381,10 @@
 			}
 		}
 				
-		require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].EXT);
+		require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver'.EXT);
 
 		// Instantiate the DB adapter
-		$driver = 'CI_DB_'. $params['dbdriver'];
+		$driver = 'CI_DB_'. $params['dbdriver'].'_driver';
 		$DB = new $driver($params);
 		
 		if ($return === TRUE)
